#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std ;

void print ( vector<int> & v )
{
	cout<< "----Info about vector<int> v-----" << endl ;
	cout<< "size()=" << v.size() << endl ; //The number of elements already stored in vector
	cout<< "max_size()=" << v.max_size() << endl ; //The maximum number of elements this vector can store.
	cout<< "capacity()=" << v.capacity() << endl ; //The number of elemnt space, which has been alocated by this vector
}

int main ( )
{
	cout<< " -------- v1 ------------" << endl ;
	vector<int> v1 ;
	print(v1) ;
	v1.push_back(1) ;
	print(v1) ;
	v1.push_back(2) ;
	v1.push_back(3) ;
	print(v1) ;
	cout<< "--------- v2 ------------" << endl ;
	vector<int> v2 ;
	back_insert_iterator<vector<int> > bii ( v2 ) ;
	print(v2) ;
	*bii = 1 ;
	print(v2) ;
	*bii = 2 ; 
	*bii = 3 ;
	print ( v2 ) ;
	copy(v2.begin(), v2.end(), ostream_iterator<int>(cout, " "));
	cout<< endl ;
	
	return 0 ;
}
